package com.bytedance.frameworks.b.a;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;

public final class c {
    private static HashMap<String, HashMap<Object, List<?>>> a = new HashMap();

    public static Object a(Class arg2) {
        List v0 = c.b(arg2, "DEFAULT_KEY");
        Object v0_1 = v0 == null || v0.size() == 0 ? null : v0.get(0);
        return v0_1;
    }

    public static void a(Class arg5, Object arg6) {
        HashMap v1_1;
        Object v0_1;
        String v2 = "DEFAULT_KEY";
        HashMap v3 = c.a;
        synchronized (v3){
            if (c.a == null) {
                c.a = new HashMap();
            }

            String v1 = arg5.getName();
            v0_1 = c.a.get(v1);
            if (v0_1 == null) {
                HashMap v0_2 = new HashMap();
                c.a.put(v1, v0_2);
                v1_1 = v0_2;
            } else {
                v1_1 = (HashMap) v0_1;
            }
            v0_1 = v1_1.get(v2);
            if (v0_1 == null) {
                v0_1 = new LinkedList();
                v1_1.put(v2, v0_1);
            }
            ((List) v0_1).add(arg6);
            return;
        }
    }

    private static List b(Class arg4, Object arg5) {
        List v0_1;
        List v1 = null;
        HashMap v2 = c.a;
        synchronized (v2) {
            if (c.a == null) {
                v0_1 = v1;
            } else {
                Object v0_2 = c.a.get(arg4.getName());
                if (v0_2 == null) {
                    v0_1 = v1;
                } else {
                    v0_1 = (List) ((HashMap) v0_2).get(arg5);
                }
            }
            return v0_1;
        }
    }
}

